package com.wardrobe.soa.api.userinfo;

import com.wardrobe.domain.userinfo.UserInfoBean;
import com.wardrobe.soa.common.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/11/14.
 */
@RestController
@RequestMapping("/api/userinfo")
public class ApiUserInfoController {
    @Autowired
    private ApiUserInfoService userInfoService;

    @RequestMapping("/getUserInfo")
    public ApiResult getUserInfo(long userId) {
        return userInfoService.getUserInfo(userId);
    }

    @RequestMapping("/modifyUserInfoById")
    public ApiResult modifyUserInfoById(UserInfoBean bean) {
        return userInfoService.modifyUserInfoById(bean);
    }

    @RequestMapping("/saveUserInfo")
    public ApiResult saveUserInfo() {
        return userInfoService.saveUserInfo();
    }
}
